Coding Pattern:
Linked List Manipulation
This pattern has an earnable cheat sheet.
Pattern concept
Step 1 of 31
Use ← → arrow keys
Code snippets
How to identify
Does the problem involve any of these?
- Reversing or rearranging the nodes in the linked list
- Swap Nodes in Pairs: Swap nodes.
- Reverse Linked List II: Reverse nodes.
- Rotate List: Rotate nodes.
- Palindrome Linked List: Reverse or rearrange nodes.
- Removing or adding nodes at specific positions in the list
- Remove Repeats from Sorted List: Remove duplicates.
Note
Most linked list problems can be solved in O(n) time since they usually require one pass through the entire linked list.